package com.hamster.crmpre.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hamster.crmpre.pojo.Project;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.springframework.stereotype.Repository;

/**
 * 项目 的 mapper
 * @author Tarry
 * @create 2019/12/24 14:41
 */
@Repository
@Mapper
public interface ProjectMapper extends BaseMapper<Project> {
    @Update("update project set del = 1 where id = #{id}")
    void deleteTag(String id);

    /**
     * 根据项目id，查询项目属于哪个类别
     * @param id
     * @return
     */
    @Select("select category_id from project where id = #{id}")
    String queryDepartmentById(String id);
}
